
import { getIndex } from "../../services/teacher"
export default {

  namespace: 'teaIndex',

  state: {
    info: ""
  },

  effects: {
    *getUserInfos({ payload }, { call, put }) {
      let { rows } = yield getIndex({ order: "asc", page: 1, rows: 100, isTeacher: 1 })
      yield put({
        type: "updateUserInfo",
        payload: rows
      })
    },
  },

  reducers: {
    updateUserInfo(state, { payload }) {
      state.info = payload;
      return { ...state, ...payload };
    },
  },

};
